package com.luohh.treeroom.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 罗辉煌
 * @since 2020-02-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserInfo implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 用户ID
     */
    @TableId(value="id", type= IdType.AUTO)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer id;

    /**
     * 昵称
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String nickName;

    /**
     * 用户名
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String userName;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private  String sign;
    /**
     * Token
     */
    @ApiModelProperty(value = "token")
    @TableField(exist = false)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String token;

    /**
     * 加盐
     */
    @ApiModelProperty(value = "加盐")
    private String salt;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")

    private String userPassword;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String userAddress;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    private String phone;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(exist = false)
    private String email;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "头像")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String image;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birthday;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @ApiModelProperty(value = "性别")
    private Integer sex;

    @TableField("is_valid")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    private Integer isValid;

    @JsonInclude(JsonInclude.Include.NON_NULL)
    private String openid;
}
